<!DOCTYPE html>
<html lang="zh-Hans">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    
    <title>薯条君的博客</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1">
    <meta name="generator" content="Hugo 0.70.0" />
    
    
      <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
    

    
    
      <link href="/dist/css/app.1cb140d8ba31d5b2f1114537dd04802a.css" rel="stylesheet">
    

    

    
      
    

    
    
      <link href="/posts/index.xml" rel="alternate" type="application/rss+xml" title="薯条君的博客" />
      <link href="/posts/index.xml" rel="feed" type="application/rss+xml" title="薯条君的博客" />
      
    
    
    <meta property="og:title" content="Posts" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://wonggamto.github.io/posts/" />
<meta property="og:updated_time" content="2020-05-16T15:42:09+08:00" />
<meta itemprop="name" content="Posts">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Posts"/>
<meta name="twitter:description" content=""/>

  </head>

  <body class="ma0 avenir bg-near-white">

    

  <header>
    <div class="pb3-m pb6-l bg-black">
      <nav class="pv3 ph3 ph4-ns" role="navigation">
  <div class="flex-l justify-between items-center center">
    <a href="http://wonggamto.github.io" class="f3 fw2 hover-white no-underline white-90 dib">
      薯条君的博客
    </a>
    <div class="flex-l items-center">
      

      
      














    </div>
  </div>
</nav>

      <div class="tc-l pv3 ph3 ph4-ns">
        <h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">
          Posts
        </h1>
        
      </div>
    </div>
  </header>


    <main class="pb7" role="main">
      
  <article class="pa3 pa4-ns nested-copy-line-height nested-img">
    <section class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy mid-gray"></section>
    <section class="flex-ns flex-wrap justify-around mt5">
      
        <div class="relative w-100 w-30-l mb4 bg-white"><div class="relative w-100 mb4 bg-white nested-copy-line-height">
  <div class="bg-white mb3 pa4 gray overflow-hidden">
    <span class="f6 db">Posts</span>
    <h1 class="f3 near-black">
      <a href="http://wonggamto.github.io/posts/%E5%9C%A8github%E4%B8%8A%E5%88%9B%E5%BB%BA%E5%8D%9A%E5%AE%A2/" class="link black dim">
        在github上创建博客
      </a>
    </h1>
    <div class="nested-links f5 lh-copy nested-copy-line-height">
      github上搭建自己的blog 安装 由于我用的是macos，所以先介绍mac的安装方式：   终端输入下面两条命令:
 brew install hugo  这个时候会进入安装
hugo version  如果上面的命令能返回一个版本号，则表示安装成功
  配置  打开hugo的官网,然后点击Quick Start   Quick Start会自动识别你的系统然后给出对应的操作提示
  终端进入 github.io-generator目录,输入
hugo new posts/my-first-post.md
  其中my-first-post指的是你的博客文章的名字，例如:
 在vscode的左侧边栏可以看到这时候博客已经创建成功了，如图:
仔细观察，draft的参数是true，代表当前是草稿模式，就是说发布以后别人是看不见的，需要在文章写完以后改成false
  写完内容以后，输入命令:
hugo server -D 点击链接，即可打开刚才写好的文章了。
  打开config.toml 文件可以修改一些对应的配置,zh-Hans是简体中文的意思   创建一个 .gitignore 文件 填写如图所示配置，让public自成一个仓库
  进入public目录
  输入 git init
git add .
git commit -m &ldquo;git创建博客教程&rdquo;
    </div>
  </div>
</div>
</div>
      
        <div class="relative w-100 w-30-l mb4 bg-white"><div class="relative w-100 mb4 bg-white nested-copy-line-height">
  <div class="bg-white mb3 pa4 gray overflow-hidden">
    <span class="f6 db">Posts</span>
    <h1 class="f3 near-black">
      <a href="http://wonggamto.github.io/posts/%E5%BC%80%E5%8D%9A%E5%A4%A7%E5%90%89/" class="link black dim">
        开博大吉
      </a>
    </h1>
    <div class="nested-links f5 lh-copy nested-copy-line-height">
      大家好 开博了，以后多多坚持
    </div>
  </div>
</div>
</div>
      
    </section>

</article>

    </main>
    <footer class="bg-black bottom-0 w-100 pa3" role="contentinfo">
  <div class="flex justify-between">
  <a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="http://wonggamto.github.io" >
    &copy;  薯条君的博客 2020 
  </a>
    <div>













</div>
  </div>
</footer>

    

  <script src="/dist/js/app.3fc0f988d21662902933.js"></script>


  </body>
</html>
